/**
 * 
 */
package com.wskj.library.employer.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.wskj.library.service.EmployerService;
import com.wskj.library.service.impl.EmployerServiceImpl;
import com.wskj.util.StringUtil;

/**
 * @author 胡洋
 * @describe 
 * @Date 2018年3月22日下午6:11:24
 * @version 1.0
 */
@WebServlet(urlPatterns="/employer/delete.do")
public class DeleteEmployerServlet extends HttpServlet {
	EmployerService  emService=new EmployerServiceImpl(); 
	
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		int eid=StringUtil.nullToInt(req.getParameter("id"));
		boolean result=emService.deletEmployerById(eid);
		resp.sendRedirect(req.getContextPath()+"/employer/list.do");
	}
	
	
}
